//
//  OCSSBaseRefreshViewController.swift
//  OCSSStoreSwift
//
//  Created by MacMiniKangChe on 2018/10/22.
//  Copyright © 2018年 MacMiniKangChe. All rights reserved.
//

import UIKit
import ESPullToRefresh

class OCSSBaseRefreshViewController: OCSSBaseViewController {

    @IBOutlet weak var tableView:UITableView!;
    
    var page:Int = 1;
    var dataArr:NSMutableArray?;
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        dataArr = NSMutableArray.init();
        tableView.es.addPullToRefresh{
            [unowned self] in
            self.refresh();
            self.tableView.es.stopPullToRefresh(ignoreDate: true);
            self.tableView.es.stopPullToRefresh(ignoreDate: false, ignoreFooter: false);
        }
        tableView.es.addInfiniteScrolling {
            [unowned self] in
            self.loadMore();
            self.tableView.es.stopLoadingMore();
            self.tableView.es.noticeNoMoreData();
            
        }
    }
//    func addData(arr: NSArray, page:NSInteger) -> NSArray {
//        let array:NSMutableArray?;
//        
//        
//    }
    func refresh() -> Void {
        
    }
    func loadMore() -> Void {
        
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}
